package cn.edu.scau.cmil.linwei.comprehensive.Script;

import javafx.beans.property.SimpleStringProperty;

public class UserData {

    private SimpleStringProperty ID;
    private SimpleStringProperty PW;
    private SimpleStringProperty Name;
    private SimpleStringProperty UserKind;//学生 1，老师 2，管理员 0
    private SimpleStringProperty InitQuestion;
    private SimpleStringProperty InitAnswer;

    public UserData() {

    }

    public UserData(String ID, String PW, String name, String userKind, String initQuestion, String initAnswer) {
        this.ID = new SimpleStringProperty(ID);
        this.PW = new SimpleStringProperty(PW);
        Name = new SimpleStringProperty(name);
        //UserKind = new SimpleStringProperty(userKind);//学生 1，老师 2，管理员 0
        if(userKind.equals("0")){//如果是管理员
            UserKind = new SimpleStringProperty("管理员");
        }
        else if(userKind.equals("1")){//如果是学生
            UserKind = new SimpleStringProperty("学生");
        }
        else if(userKind.equals("2")){//如果是老师
            UserKind = new SimpleStringProperty("老师");
        }
        InitQuestion = new SimpleStringProperty(initQuestion);
        InitAnswer = new SimpleStringProperty(initAnswer);
    }


    public String getID() {
        return ID.get();
    }

    public SimpleStringProperty IDProperty() {
        return ID;
    }

    public void setID(String ID) {
        this.ID.set(ID);
    }

    public String getPW() {
        return PW.get();
    }

    public SimpleStringProperty PWProperty() {
        return PW;
    }

    public void setPW(String PW) {
        this.PW.set(PW);
    }

    public String getName() {
        return Name.get();
    }

    public SimpleStringProperty nameProperty() {
        return Name;
    }

    public void setName(String name) {
        this.Name.set(name);
    }

    public String getUserKind() {
        return UserKind.get();
    }

    public SimpleStringProperty userKindProperty() {
        return UserKind;
    }

    public void setUserKind(String userKind) {
        this.UserKind.set(userKind);
    }

    public String getInitQuestion() {
        return InitQuestion.get();
    }

    public SimpleStringProperty initQuestionProperty() {
        return InitQuestion;
    }

    public void setInitQuestion(String initQuestion) {
        this.InitQuestion.set(initQuestion);
    }

    public String getInitAnswer() {
        return InitAnswer.get();
    }

    public SimpleStringProperty initAnswerProperty() {
        return InitAnswer;
    }

    public void setInitAnswer(String initAnswer) {
        this.InitAnswer.set(initAnswer);
    }

}
